package com.tmt.im.jpa.entity;

import com.tmt.data.jpa.entity.TmtBaseEntityId;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.sql.Timestamp;

/**
 * 系统参数表
 *
 * @Description TODO
 * @Author wuyi
 * @Date 2024/9/20 16:00
 * @Version 1.0
 **/
@Getter
@Setter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "system_param")
@Tag(name = "SystemParam", description = "系统参数表")
public class SystemParam extends TmtBaseEntityId {

    @Serial
    private static final long serialVersionUID = 7549559052611278926L;

    @Schema(description = "参数名称")
    @Column(nullable = false)
    private String name;

    @Schema(description = "参数编码")
    @Column(nullable = false, unique = true)
    private String paramCode;

    @Schema(description = "参数简单值")
    private String paramValue;

    @Schema(description = "参数扩展信息，JSON格式")
    private String paramExtend;

    @Schema(description = "参数描述")
    private String descr;

    @Schema(description = "最后更新时间")
    @Temporal(TemporalType.TIMESTAMP)
    private Timestamp updateTime;

}
